package cc.rengu.redp.bizimpl.upmp.vo;


import cc.rengu.redp.bizimpl.enums.ValidatMethodEnum;

import java.io.Serializable;

/**
 * excel中每个字段的属性 列名、列对应英文名、是否必输、最大长度
 * Created by Daniel on 2020/4/15.
 */
public class ExcelColumnAttr implements Serializable {
    /** 列名 */
    private String columnName;
    /** 列对应英文名 */
    private String columnEname;
    /** 是否必输 */
    private boolean requiredFlag;
    /** 最大长度 */
    private int maxLength;
    /** 必输、长度以外的正则表达式校验规则 */
    private ValidatMethodEnum validatMethodEnum;
    /** 导入或导出需要做美剧转换时指定的枚举类 */
    private Class convertValueByEnumClazz;

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnEname() {
        return columnEname;
    }

    public void setColumnEname(String columnEname) {
        this.columnEname = columnEname;
    }

    public boolean isRequiredFlag() {
        return requiredFlag;
    }

    public void setRequiredFlag(boolean requiredFlag) {
        this.requiredFlag = requiredFlag;
    }

    public int getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(int maxLength) {
        this.maxLength = maxLength;
    }

    public ValidatMethodEnum getValidatMethodEnum() {
        return validatMethodEnum;
    }

    public void setValidatMethodEnum(ValidatMethodEnum validatMethodEnum) {
        this.validatMethodEnum = validatMethodEnum;
    }

    public Class getConvertValueByEnumClazz() {
        return convertValueByEnumClazz;
    }

    public void setConvertValueByEnumClazz(Class convertValueByEnumClazz) {
        this.convertValueByEnumClazz = convertValueByEnumClazz;
    }

    public ExcelColumnAttr(String columnEname, int maxLength, boolean requiredFlag, String columnName, ValidatMethodEnum validatMethodEnum) {
        this.columnName = columnName;
        this.columnEname = columnEname;
        this.requiredFlag = requiredFlag;
        this.maxLength = maxLength;
        this.validatMethodEnum = validatMethodEnum;
    }

    public ExcelColumnAttr(String columnEname, int maxLength, boolean requiredFlag, String columnName, ValidatMethodEnum validatMethodEnum, Class convertValueByEnumClazz) {
        this.columnName = columnName;
        this.columnEname = columnEname;
        this.requiredFlag = requiredFlag;
        this.maxLength = maxLength;
        this.validatMethodEnum = validatMethodEnum;
        this.convertValueByEnumClazz = convertValueByEnumClazz;
    }


    public ExcelColumnAttr() {
    }
}
